import { _axios } from '@/utils/request'
// 获取所有权限点
export const syspermission = () => {
  return _axios({
    url: '/sys/permission'
  })
}
// 添加权限点
export const syspermissionPOST = (data) => {
  return _axios({
    url: '/sys/permission',
    method: 'post',
    data
  })
}
// 删除权限
export const syspermissionDelete = (id) => {
  return _axios({
    url: `/sys/permission/${id}`,
    method: 'DELETE'
  })
}
// 编辑权限
export const syspermissionPut = (data) => {
  return _axios({
    url: `/sys/permission/${data.id}`,
    method: 'put',
    data
  })
}
// 给员工分配角色
export const sysuserassignRoles = (data) => {
  return _axios({
    url: '/sys/user/assignRoles',
    method: 'put',
    data
  })
}
